<?

class OutputAssigner implements ArrayAccess{
    public function __set($name, $val){
        Output::assign($name, $val);
    }

    public function __get($name){
        return Output::getVar($name);
    }

    public function offsetExists($offset){
        return Output::isSetVar($offset);
    }

    public function offsetGet($offset){
        return Output::getVar($offset);
    }

    public function offsetSet($offset, $value){
        Output::assign($offset, $value);
    }

    public function offsetUnset($offset){
        Output::assign($offset, null);
    }
}